<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta content="" name="description">
<meta content="" name="keywords">
<meta content="eric.wu" name="author">
<meta content="application/xhtml+xml;charset=UTF-8" http-equiv="Content-Type">
<meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
<meta content="no-cache" http-equiv="pragma">
<meta content="0" http-equiv="expires">
<meta content="telephone=no, address=no" name="format-detection">
<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
<link rel="stylesheet" type="text/css" href="../addons/stonefish_chailihe/template/css/reset.css?{php echo time()}" media="all" />
<link rel="stylesheet" type="text/css" href="../addons/stonefish_chailihe/template/css/myPrize.css?{php echo time()}" media="all" />
<link rel="stylesheet" type="text/css" href="../addons/stonefish_chailihe/template/css/platform.css?{php echo time()}" media="all" />
<script type="text/javascript" src="../addons/stonefish_chailihe/template/css/zepto_min.js?{php echo time()}"></script>
<title>我的礼盒-{$reply['title']}</title>
<style type="text/css">
    html{color:{$template['textcolor']};}
    html{background-color: {$template['bgcolor']};}
    body{font-size:{$template['fontsize']}px;color:{$template['textcolor']};}
    a:link, a:visited, a:hover, a:active { color:{$template['textcolorlink']}; text-decoration:none; } 
	img{max-width:100%!important;}
	.container {
        background:url('{php echo toimage($template['bgimglihe'])}') no-repeat;
        -webkit-background-size: 100%;
    }
    .copyright{color:{$template['textcolor']};bottom: 50px;}
	/*礼盒样式式*/
	{loop $lihestyle $lihestyles}
	.choose-content .prize{$lihestyles['liheid']}{
	    background-image: url({php echo toimage($lihestyles['thumb1'])});
    }
	{/loop}
	.choose-num{color:{$template['navcolor']};}
	.choose-num b{color:{$template['navtextcolor']};}
	.choose-content-identifier li.current{background: {$template['navactioncolor']};}
	.watch .watch_content{background-color: {$template['watchcolor']};color: {$template['watchtextcolor']};}
	.common_hr{border-bottom: 1px solid {$template['watchtextcolor']};}
	.share-layer{background-image: url({php echo toimage($share['share_pic'])});}
	.text-num-have,.text-num-rest{color:{$template['rulecolor']};}
	.progress-num-current{background-image: -webkit-linear-gradient({$template['ruletextcolor']},{$template['ruletextcolor']} 50%, {$template['ruletextcolor']} 51%, {$template['ruletextcolor']} 100%);}
	.progress-num{border: 2px solid {$template['rulecolor']};}
</style>
<script>
    (function(){
        window.config_custom = {
            IMG:{
                //BG:"http://stc.weimob.com/img/activity/sendPrize/duanwujie/5.png"
                //BG:"http://stc.weimob.com/img/activity/sendPrize/duanwujie/5.png"
            },
            ISPLATFORM:false, //别人版本是true 自己版本 是false
            SLIDEVERTICAL: {if $reply['slidevertical']==1}true{else}false{/if}, //多个礼盒切换效果
            ABOVEMAX:{$abovemax}, //是否在领一个
            prize:[{$prize}]
            // i:true=>打开过 false=>未打开过
            // rc:true=>被领完了 false=>未被领完
        }
    })();
</script>
<script src="../addons/stonefish_chailihe/template/js/common.js?{php echo time()}"></script>
<script src="../addons/stonefish_chailihe/template/js/iscroll.js?{php echo time()}"></script>
<script src="../addons/stonefish_chailihe/template/js/myPrize.js?{php echo time()}"></script>
</head>
<body onselectstart="return true;" ondragstart="return false;"  >
    <div data-role="container" class="container ">
        <header data-role="header"><!----></header>
        <section data-role="body" class="body">
            <div class="layer-row"></div>
            <div class="choose-content">
                <ul>
					{loop $listlihe $row}
					<li class="prize{$row['liheid']}" data-id="{$row['id']}">{if $row['shangjialogo']!=''}<img src="{php echo toimage($row['shangjialogo'])}" />{/if}</li>
					{/loop}	
                </ul>
            </div>
            <ul class="choose-content-identifier">
            </ul>
            <div class="text-num"> <!-- rechoose/full -->
                <span class="text-num-have">0</span>
                <span class="text-num-rest">0</span>
            </div>
            <div class="progress-num">
                <div class="progress-num-current"></div>
            </div>
            <div class="btn-layout">
                <a href="javascript:void(0);" class="btn-help" ></a>
                <form action="{$openliheurl}" method="post">
                    <input type="hidden" value="0" name="info-prize" />
                    <input type="submit" class="btn-open" value=""/>
                </form>
                <a href="{$againreglihe}" class="btn-again2"></a>
                <a href="{$againreglihe}" class="btn-again big"></a>
                <form action="{$viewliheurl}" method="post">
                    <input type="hidden" value="0" name="info-prize2" />
                    <input type="submit" class="btn-see" value=""/>
                </form>
            </div>
        </section>
        <footer data-role="footer">
            <span class="copyright">©{$reply['copyright']}</span>
        </footer>
		{template 'footer'}
    </div>
    <div class="share-layer"></div>
<div class="watch" id="share_box_tip" style="display:none">
    <div class="watch_content" style="height:120px;">
        <div id="share_tip"></div>
		<hr class="common_hr" />
		<div style="margin-top:10px;" id="share_miao"></div>
    </div>
</div>
<script>var require = { urlArgs: 'v={php echo date('YmdH');}' };</script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script src="{$_W['siteroot']}app/resource/js/require.js"></script>
<script src="{$_W['siteroot']}app/resource/js/app/config.js"></script>
<script>
	// jssdk config 对象
	jssdkconfig = {php echo json_encode($_W['account']['jssdkconfig']);} || { jsApiList:[] };
	
	// 是否启用调试
	// jssdkconfig.debug = true;
	
	// 已经注册了 jssdk 文档中所有的接口
	jssdkconfig.jsApiList = [
		'checkJsApi',
		'onMenuShareTimeline',
		'onMenuShareAppMessage',
		'onMenuShareQQ',
		'onMenuShareWeibo',
		'showOptionMenu',		
	];
	
	wx.config(jssdkconfig);
	
	window.shareData = {  
            "imgUrl": "{$shareimg}", 
            "timeLineLink": "{$sharelink}",
            "sendFriendLink": "{$sharelink}",
            "weiboLink": "{$sharelink}",
            "tTitle": "{$sharetitle}",
            "fTitle": "{$sharetitle}",
            "tContent": "{$sharedesc}",
            "fContent": "{$sharedesc}",
            "wContent": "{$sharedesc}" 
        };
        document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
        // 发送给好友
        WeixinJSBridge.on('menu:share:appmessage', function (argv) {
            WeixinJSBridge.invoke('sendAppMessage', { 
                "img_url": window.shareData.imgUrl,
                "img_width": "640",
                "img_height": "640",
                "link": window.shareData.sendFriendLink,
                "desc": window.shareData.fContent,
                "title": window.shareData.fTitle
            }, function (res) {
                _report('timeline', res.err_msg);
            })
        });

        // 分享到朋友圈
        WeixinJSBridge.on('menu:share:timeline', function (argv) {
            WeixinJSBridge.invoke('shareTimeline', {
                "img_url": window.shareData.imgUrl,
                "img_width": "640",
                "img_height": "640",
                "link": window.shareData.timeLineLink,
                "desc": window.shareData.tContent,
                "title": window.shareData.tTitle
            }, function (res) {
                _report('timeline', res.err_msg);
            });
        });
        // 分享到微博
        WeixinJSBridge.on('menu:share:weibo', function (argv) {
            WeixinJSBridge.invoke('shareWeibo', {
                "content": window.shareData.wContent,
                "url": window.shareData.weiboLink,
            }, function (res) {
                _report('weibo', res.err_msg);
            });
        });
        }, false)
</script>
</body>
</html>